package com.huyong.android.weatherforecast;

import android.app.DownloadManager;

import androidx.fragment.app.Fragment;

import org.xutils.common.Callback;
import org.xutils.http.RequestParams;
import org.xutils.x;

public class BaseFragment extends Fragment implements Callback.CommonCallback<String> {
    /*
    xutils加载网络步骤
    1.声明整体模块
    2.执行网络请求操作
     */

    public void loadData(String path){
        RequestParams requestParams = new RequestParams(path);
        x.http().get(requestParams,this);
    }


    @Override
    public void onSuccess(String result) {

    }

    @Override
    public void onError(Throwable ex, boolean isOnCallback) {

    }

    @Override
    public void onCancelled(CancelledException cex) {

    }

    @Override
    public void onFinished() {

    }
}
